package cn.edu.hust.cm.glideimagedemo;


import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.SeekBar;


/**
 * A simple {@link Fragment} subclass.
 */
public class SeekBarDialogFragment extends DialogFragment {

    private SeekBar mSbCornerRadius;

    public SeekBarDialogFragment() {
        // Required empty public constructor
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View view = inflater.inflate(R.layout.fragment_seek_bar_dialog, container, false);
        mSbCornerRadius = (SeekBar) view.findViewById(R.id.sb_corner_radius);

        if (getActivity() instanceof SeekBar.OnSeekBarChangeListener) {
            mSbCornerRadius.setOnSeekBarChangeListener((SeekBar.OnSeekBarChangeListener) getActivity());
        }
        return view;
    }

}
